import {createRouter,createWebHashHistory} from 'vue-router'


const Login = ()=> import("../views/Login.vue")
const UserCenter = ()=> import("../views/user-center/Index.vue")
const UserProfile= ()=> import("../views/user-center/Profile.vue")
const UserSettings = ()=> import("../views/user-center/Settings.vue")

const routes = [
    {
        path:'/',
        redirect: '/login'
    },
    {
        path:'/login',
        component: Login
    },
    {
        path:'/user',
        component: UserCenter,
        redirect: '/user/profile',
        children:[
            {
                path:'profile',
                component: UserProfile
            },
            {
                path:'settings',
                component: UserSettings
            },
        ]

    },
]


const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router